PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Handlers for Stay-Open Script Applications

By default, a script application that receives a Run or Open command handles that single command and then quits. This allows it to perform a single task and get out of your way. In contrast, a stay-open script application (one saved with the Stay Open checkbox selected in the Script Editor's Save As dialog box) stays open after it's launched.

A stay-open script application can be useful for any of the following reasons:

All stay-open applications receive periodic Idle events. If a stay-open script application includes a handler for the Idle event, it can perform periodic actions whenever it is not responding to other events. If a stay-open script application includes a handler for the Quit event, it can perform some action, such as checking with the user, before quitting.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)